package com.dapeis.service;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import tk.mybatis.mapper.entity.Example;

import com.ag.dao.DBService;
import com.ag.dao.IDao;
import com.dapeis.dao.IUserInformationMapper;
import com.dapeis.domain.UserInformation;
/**
 * 
 * Title:UserInformationService.java UserInformationService
 * Description:
 * @author yuanyong
 * @date 2017年5月9日 下午8:21:52 
 * Email: hzyuanyong@126.com
 *
 */
@Service
public class UserInformationService extends DBService<UserInformation> {

    @Resource
    IUserInformationMapper mapper;

    @Override
    protected IDao<UserInformation> getIDao() {
	return mapper;
    }

    public UserInformation getUserInformationByUserId(Integer userId) {
	Example example = example();
	example.createCriteria().andEqualTo(UserInformation.PROPERTY_USERID,
		userId);
	return selectOneByExample(example);
    }

}
